import 'package:demo/components/horsepower.dart';
import 'package:flutter/material.dart';
import 'package:flutter_htmlful/flutter_htmlful.dart';

import '../components/water_pipe_painter.dart';

class Home2Page extends StatefulWidget {
  const Home2Page({super.key});

  @override
  State<Home2Page> createState() => _Home2PageState();
}

class _Home2PageState extends State<Home2Page> {
  int current = 0;
  int current2 = 0;

  @override
  Widget build(BuildContext context) {
    return Div(
      body: [
        HorsepowerWidget(
          size: const Size(200, 20),
          max: 20,
          current: current,
        ),
        FloatingActionButton(onPressed: () {
          setState(() {
            current = 7;
          });
        }),
        // const WaterPipeAnimation(),
        TextButton(
          onPressed: () {
            setState(() {
              current++;
            });
          },
          child: Text('data$current'),
        ),
      ],
      style: Style(
        paddingTop: 100,
      ),
    );
  }
}
